<template>
  <div class="headers">
    <div class="title-wrapper">
      <icon-font icon-class="afl-xuanze" :icon-style="{fontSize:'20px'}"></icon-font>
      {{ $t('wms.aGivenYear') }}
      <div class="year-boxs">
        <el-date-picker
          v-model="data.year"
          type="year"
          placeholder="Pick a year"
        />
      </div>
    </div>
    <div class="year-list">
      <div class="containers">
        <el-checkbox class="year-box" v-for="i in 40" :key="i" :v-model="'checked'+i" :label="'Option'+i" size="large"/>
      </div>
    </div>
  </div>
</template>

<script setup>
import { reactive, ref, watch, onMounted } from 'vue'
import iconFont from '@/components/IconFont/iconFont'

const data = reactive({
  year: (new Date()).getFullYear() + ''
})
</script>

<style scoped lang="scss">
.headers {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.title-wrapper {
  //background: linear-gradient(90deg, #5171fd, #c97afd);
  //background: linear-gradient(90deg, #0081ff, #1cbbb4);
  background: linear-gradient(90deg, #3dadf6, #737bfc);
  font-size: var(--el-font-size-extra-large);
  line-height: 3;
  font-weight: bold;
  padding-left: 20px;
  color: white;
  display: flex;
  flex-direction: row;

  .year-boxs {
    width: 70%;
    padding: 0 10px;
    overflow: hidden;
    box-sizing: border-box;
  }
}

.year-list {
  flex: 1;
}

.containers {
  height: 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.year-box {
  height: 4%;
  width: 48%;
  font-size: 18px;
  padding: 10px;
  box-sizing: border-box;
  margin: 0 5px 5px 0;
  font-weight: 800;
}

.year-box:nth-child(even) {
  margin: 0 0px 5px 0 !important;
}
</style>
